﻿package net.wangit.view.chart;

import net.wangit.framework.cache.Cache;
import net.wangit.framework.util.CacheUtil;

public class ChartCache {

	public ChartCache() {
	}

	public static Chart get(String domain, String chartId) {
		return (Chart) getCache(domain).get(chartId);
	}

	public static void put(String domain, String chartId, Chart chart) {
		getCache(domain).put(chartId, chart);
	}

	public static void clear(String domain, String chartId) {
		getCache(domain).clear(chartId);
	}

	public static void clearAll(String domain) {
		getCache(domain).clearAll();
	}

	private static Cache getCache(String domain) {
		return CacheUtil.getChartCache(domain);
	}
}
